#include<bits/stdc++.h>
using namespace std;

int n;
const int N = 1000010;
int r[N],ne[N];

int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin >> n;
    int ans = n;
    for(int i = 1;i <= n;i ++) cin >> r[i];
    sort(r + 1,r + 1 + n);
    int idx = 1;
    for(int i = n;i >= 1;i --)
    {
        if(i == idx)
        {
            ans --;
            break;
        }
        else
        {
            if(r[i] > r[idx] && ne[i] == 0 && ne[idx] == 0)
            {
                ne[i] == 1,ne[idx] == 1;
                ans --;
                idx ++;
            }
            else
            {
                if(r[i] == r[idx] && ne[i] == 0)
                {
                    ne[i] == 1;
                    idx ++;
                }
            }
        }
    }
    cout << ans << "\n";
    return 0;
}

